#if !defined(ximera_math_aabb_hpp)
#define ximera_math_aabb_hpp

// -----------------------------------------------------------

#include <ximera/math/vector3.hpp>

namespace ximera { namespace math
{
    class XIMERA_API Aabb
    {
    public:
        Vector3 min;
        Vector3 max;

    public:
        Aabb();
        Aabb(Vector3 const& min, Vector3 const& max);
        Aabb(Vector3 const& center, Real width, Real height, Real depth);
        Aabb(Vector3 const& center, Real size);

        Vector3 center() const;
        Vector3 size() const;
        Vector3 halfSize() const;

        Real volume() const;

        void merge(Aabb const& box);
        void merge(Vector3 const& point);

        bool contains(Vector3 const& point) const;
        bool intersects(Aabb const& box) const;
    };
}}

#include <ximera/math/inline/aabb.inl>

// -----------------------------------------------------------

#endif